var util = require('../../utils/util.js');
var WXBizDataCrypt = require('../../crypto/WXBizDataCrypt.js');
let app = getApp();
let url = app.url;
let gobalData = app.gobalData;
Page({

  /**
   * 页面的初始数据
   */
  data: {
		count: 0,
		num: 3,
		images: "",
		leaderId: ''
  },
// 点击执行弹出模态框
	SupervisorConsultation: function(){
    wx.showModal({
      title: '咨询电话',
      content: '400-1000-466',
      cancelColor: '#fd8439',
      confirmText: '拨打电话',
      confirmColor: '#fd8439',
      success: function (res) {
        // 判断用户点击的是拨打电话还是取消
        if (res.confirm) {
          wx.makePhoneCall({
            phoneNumber: '4001000466'
          })
        }
      }
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
		this.setData({
			leaderId: options.leaderId
		})
		util(`${url}SupervisionApply/supervisionHome`).then(res=>{
			if (res.status == 1) {
				this.setData({
					images: res.content
				})
			} else {
				wx.showToast({
					title: "获取图片失败",
					icon: "none"
				})
			}
		})
  },
	// 不忍直视！！！！！！！！
	ToggleOne(){
		this.setData({
			count: 0
		})
	},
	ToggleTwo(){
		this.setData({
			count: 1
		})
	},
	ToggleThree(){
		this.setData({
			count: 2
		})
	},
	ToggleFour(){
		this.setData({
			count: 3
		})
	},
	hasOne(){
		this.setData({
			num: 0
		})
	},
	hasTwo(){
		this.setData({
			num: 1
		})
	},
  hasThree(){
		this.setData({
			num: 2
		})
	},
	hasFour(){
		this.setData({
			num: 3
		})
	}
})